%% use for show samples

%%
clear all;
close all;
clc;
%%
path='../facesample/';
sampleitem='snapshot21';
triindex='index';
ftyp1='.jpg';
ftyp2='.PTS';
ftyp3='.txt';
tri=load([triindex,ftyp3]);
tri= int32(tri);
img=imread([path,sampleitem,ftyp1]);
figure(1);
imshow (img);
points=load([path,sampleitem,ftyp2]);
points=int32(points);
%tri=delaunay(points(:,1),points(:,2));
hold on 
figure(1)
plot(points(:,1),points(:,2),'r+');


%for i=1:size(tri,1)

%    trianglex=[points(tri(i,1),1);points(tri(i,2),1);points(tri(i,3),1);points(tri(i,1),1)];
%    triangley=[points(tri(i,1),2);points(tri(i,2),2);points(tri(i,3),2);points(tri(i,1),2)];
%    plot(trianglex,triangley,'k');

%end
hold off
